import request from '@/utils/request'

// 查询农业规则列表
export function listRules(query) {
  return request({
    url: '/znjc/rules/list',
    method: 'get',
    params: query
  })
}

// 查询农业规则详细
export function getRules(ruleId) {
  return request({
    url: '/znjc/rules/' + ruleId,
    method: 'get'
  })
}

// 新增农业规则
export function addRules(data) {
  return request({
    url: '/znjc/rules',
    method: 'post',
    data: data
  })
}

// 修改农业规则
export function updateRules(data) {
  return request({
    url: '/znjc/rules',
    method: 'put',
    data: data
  })
}

// 删除农业规则
export function delRules(ruleId) {
  return request({
    url: '/znjc/rules/' + ruleId,
    method: 'delete'
  })
}
